extends Node2D


# Declare member variables here. Examples:
# var a = 2
# var b = "text"


# Called when the node enters the scene tree for the first time.
func _ready():
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass
func _on_Camera2D_cam_position(cam_position):
	$CameraLeftWall.position.x = cam_position.x - 208
	$CameraRightWall.position.x = cam_position.x + 112
	$OffScreenIndicator.position.x = $Player.position.x
	pass # Replace with function body.


func _on_Player_offScreen():
	$OffScreenIndicator.visible = true
	$OffScreenIndicator.position.x = $Player.position.x
	if $Player.motion.y < 0:
		$OffScreenIndicator.animation = "up"
	if $Player.motion.y > 0:
		$OffScreenIndicator.animation = "down"
	pass # Replace with function body.


func _on_Player_onScreen():
	$OffScreenIndicator.visible = false
	pass # Replace with function body.
